<link rel="stylesheet" href="./vanui.css">
<div id="root">
    <h1>首页</h1>
    <van-nav-bar
    title="首页"
    @click-left="onClickLeftFn"
    @click-right="onClickRightFn"
    ></van-nav-bar>

    <br>
    <van-button title="创建" type="lightcoral" @click="fatherClickFn"></van-button>
    <van-button title="修改" type="grey" @click="fatherClickFn"></van-button>

    <van-loading :show="true"></van-loading>

    <br>
    <van-tips title="密码错误":show="true"></van-tips>
    <br>
    <van-table :columns="columns1" :data="data1"></van-table>

</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="./vanui.js"></script>
<script>
const vm = new Vue({
    el: "#root",
    data: {
        columns1:[
        {title:'编号', key: 'id'},
        {title:'姓名', key: 'name'},
        {title:'年龄', key: 'age'},
        {title:'地址', key: 'address'},
        ],
        data1:[
        {id:1, name: 'awe', age: 18, address: 'aaa'},
        {id:2, name: 'erdf', age: 38,address: 'tyj'},
        {id:3, name: 'fges', age: 8,address: 'edfg'},
        {id:4, name: 'werd', age: 8,address: 'jhgy'},
        ],
    },
    methods:{
        onClickLeftFn(){
            console.log('onClickLeftFn');
        },
        onClickRightFn(){
            console.log('onClickRightFn');
        },
        fatherClickFn(){
            console.log('fatherClickFn');
        }
    }
})
</script>